package com.ldzy.webase.dao;

import com.ldzy.webase.entity.TodayCuisine;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;

/**
 * @author ：Lq
 * @version ：1.0
 * @date ：2022/11/16 10:56
 * @description ：t_todaycuisine-今日菜系表-数据层
 */
public interface TodayCuisineMapper {
    // 查询今日菜系所有菜品-可根据今日24小时查询新上新菜品
    @Select("<script>" +
            "SELECT * FROM t_todaycuisine " +
            "<where> " +
            "<if test=\"is24Hour != false and is24Hour != null and is24Hour != ''\"> " +
            "createDate >=(NOW() - interval 24 hour) " +
            "</if>" +
            "</where>" +
            "</script>")
    List<TodayCuisine> getAllTodayCuisine(@Param("is24Hour") Boolean is24Hour);
}
